package com.plm.frame.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.plm.frame.mapper.UserMapper;
import com.plm.frame.model.User;
import com.plm.frame.service.UserService;



@Service
@Transactional  //此处不再进行创建SqlSession和提交事务，都已交由spring去管理了。
public class UserServiceImpl implements UserService {
	
	@Resource
	private UserMapper mapper;


	@Override
	public List<User> selectUser(User user) {
		// TODO Auto-generated method stub
		return mapper.selectUser(user);
	}


	@Override
	public User searchUser(User user) {
		// TODO Auto-generated method stub
		return mapper.searchUser(user);
	}


	@Override
	public void saveUser(User user) {
		mapper.saveUser(user);
		
	}


	@Override
	public void editUser(User user) {
		// TODO Auto-generated method stub
		mapper.editUser(user);
	}
	
	@Override
	public void deleteUser(User user) {
		// TODO Auto-generated method stub
		mapper.deleteUser(user);
	}


}
